
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;

/**
 * Created with IDEA
 * author:ju bai
 * Date:2021/1/21
 * Time:15:28
 **/

class Student{
    public String name;
    public String grade;
    public double score;

    public Student(String name, String grade, double score) {
        this.name = name;
        this.grade = grade;
        this.score = score;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", grade='" + grade + '\'' +
                ", score=" + score +
                '}';
    }
}

public class Main {

    public static List<Character> func(String str1,String str2) {
        if(str1.contains(str2)){
            List <Character> list = new ArrayList<>();
            if()
        }
        return list;
    }

    public static void main3(String[] args) {
        A<Integer> Integer = new A<Integer>(123456);
        A<String> String = new A<String>("橘子水");
        System.out.println(("value is " + Integer.get()));
        System.out.println(("value is " + String.get()));
    }
    public static void main2(String[] args) {
        ArrayList<Integer> list = new ArrayList<>();
        list.add(10);
        list.add(4);
        list.add(7);
        list.add(9);
        Collections.sort(list);//用来对List类型进行排序
        System.out.println(list);
    }
    public static void main1(String[] args) {
        ArrayList<Student> list = new ArrayList<>();
        list.add(new Student("橘白","4班",100));
        list.add(new Student("狗蛋","4班",90.0));
        list.add(new Student("旺财","4班",89.4));
        /*for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }*/
        /*for (Student student:list) {
            System.out.println(student);
        }*/
        Iterator<Student> it = list.iterator();
        while(it.hasNext()){
            System.out.println(it.next());
        }
    }
}
